from playwright.sync_api import sync_playwright

#同步操作
def main():
    with sync_playwright() as p:
        brower = p.chromium.launch(headless=False)
        page = brower.new_page()
        page.goto("https://www.ztu.edu.cn")
        print(page.title())
        print(page.content())

main()